<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<title>Inventory : Receive</title>
</h:head>
<h:body>
	<ui:composition template="/WEB-INF/templates/1000_layout.xhtml">
		<ui:define name="content">
			<br />
			<p:fieldset id="fsMain" legend="For Pickup">
				<h:form id="frmHeader">
					<ui:include src="/WEB-INF/templates/entity/purchaseOrder.summary.readonly.xhtml">
						<ui:param name="purchaseOrder" value="#{dtInventoryReceivableView.purchaseOrder}" />
					</ui:include>
				</h:form>
				<br />

				<h:form>
					<p:dataTable var="poItem"
						value="#{dtInventoryReceivableView.purchaseOrder.items}">
						<p:column headerText="Item #">
							<h:outputText value="#{poItem.itemNumber}" />
						</p:column>
						<p:column headerText="Description">
							<h:outputText value="#{poItem.partUnit.shortName}" />
						</p:column>
						<p:column headerText="Brand">
							<h:outputText value="#{poItem.partUnit.shortBrand}" />
						</p:column>
						<p:column headerText="Part #">
							<h:outputText value="#{poItem.partUnit.part}" />
						</p:column>
						<p:column headerText="Qty">
							<h:outputText value="#{poItem.quantity}" />
						</p:column>
						<p:column headerText="Warehouse Bin">
							<p:inputText
								value="#{dtInventoryReceivableView.locationMap[poItem.id]}" />
						</p:column>
					</p:dataTable>
					<br/>
					<p:commandButton value="Release and Close" update="@form"
						action="#{dtInventoryReceivableView.release}" />
				</h:form>
			</p:fieldset>
		</ui:define>
	</ui:composition>
</h:body>
</html>